<template>
  <div class="temp_child">
    <h4>子组件A</h4>
    <p class="info">子组件通过props接收父组件传递的数据</p>
    <ul class="list">
      <li class="item" v-for="(item,index) in nameList" :key="index">{{item}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "childA",
  props:{
    nameList:{
      type:Array,
      default:['无']
    }
  },
}
</script>

<style scoped>
h4{
  background-color: antiquewhite;
}
.list{
  background-color: chocolate;
  color: #ffffff;
}
.info{
  color: #999;
}
</style>
